import request from '@/utils/request.js'

// 地理编码：将地址转换为经纬度
export const geocode = (address) => {
  return request({
    url: '/gaode/geocode',
    method: 'GET',
    params: { address }
  })
}

// 逆地理编码：将经纬度转换为地址
export const regeocode = (location) => {
  return request({
    url: '/gaode/regeocode',
    method: 'GET',
    params: { location }
  })
}